﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Zeus.Pattern.Chain
{
    public class ProcessNode : IProcess
    {
        public int SeqNo { get; set; }
        public string ProcessName { get; set; }

        public ProcessNode Next { get; set; }

        public ProcessNode Previous { get; set; }

        public void AddNext(ProcessNode node)
        {
            if (Previous == null)
                SeqNo = 1;
            else
                SeqNo = Previous.SeqNo + 1;

            Next = node;
        }

        public void AddPrevious(ProcessNode node)
        {
            Previous = node;
        }

        public virtual void DoWork()
        {
            
        }
    }
}
